package abstractClasses;

public class PersonTest {
    public static void main(String[] args) {
        var people = new Person[2];

        // 使用 Person 和 Employee 对象填充 数组
        people[0] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
        people[1] = new Student("Carl Cracker", "Computer Science");

        // 打印出所有 Person 对象的名字和描述
        for (var p : people) {
            System.out.println(p.getName() + ", " + p.getDescription());
        }
    }
}
